package bb.lanxing.lib.kt.model;

import com.garmin.fit.MonitoringReader;
import com.tencent.open.SocialConstants;
//import com.umeng.umcrash.UMCrash;
import kotlin.Metadata;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;

public final class CadenceData implements ICadenceData {
    public static final Companion Companion = new Companion(null);
    private int CSCFlags;
    private double altitude;
    private int cadence;
    private int cadenceTime;
    private double distance;
    private boolean isCalibrated;
    private int pressure;
    private float realPressure;
    private float realTemperature;
    private double speed;
    private int sumCadence;
    private int sumDistance;
    private int sumDuration;
    private int sumWheel;
    private int temperature;
    private long timestamp;
    private int wheelRpm;
    private int wheelTime;
    private int source = 2;
    private String deviceAddress = "";

    public static /* synthetic */ CadenceData copy$default(CadenceData cadenceData, long j, int i, Object obj) {
        if ((i & 1) != 0) {
            j = cadenceData.timestamp;
        }
        return cadenceData.copy(j);
    }

    public long component1() {
        return this.timestamp;
    }

    public CadenceData copy(long j) {
        return new CadenceData(j);
    }

    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        return (obj instanceof CadenceData) && this.timestamp == ((CadenceData) obj).timestamp;
    }

    private static int dataParser(long j) {
        return (int) (j ^ (j >>> 32));
    }
    public int hashCode() {
        return dataParser(this.timestamp);
    }

    public String toString() {
        return "CadenceData(timestamp=" + this.timestamp + ')';
    }

    public CadenceData(long j) {
        this.timestamp = j;
    }

    public long getTimestamp() {
        return this.timestamp;
    }

    public void setTimestamp(long j) {
        this.timestamp = j;
    }

    public int getSumCadence() {
        return this.sumCadence;
    }

    public void setSumCadence(int i) {
        this.sumCadence = i;
    }

    public int getCadenceTime() {
        return this.cadenceTime;
    }

    public void setCadenceTime(int i) {
        this.cadenceTime = i;
    }

    public int getSumWheel() {
        return this.sumWheel;
    }

    public void setSumWheel(int i) {
        this.sumWheel = i;
    }

    public int getWheelTime() {
        return this.wheelTime;
    }

    public void setWheelTime(int i) {
        this.wheelTime = i;
    }

    public int getPressure() {
        return this.pressure;
    }

    public void setPressure(int i) {
        this.pressure = i;
    }

    public int getTemperature() {
        return this.temperature;
    }

    public void setTemperature(int i) {
        this.temperature = i;
    }

    public int getCadence() {
        return this.cadence;
    }

    public void setCadence(int i) {
        this.cadence = i;
    }

    public int getWheelRpm() {
        return this.wheelRpm;
    }

    public void setWheelRpm(int i) {
        this.wheelRpm = i;
    }

    @Override
    public double getSpeed() {
        return this.speed;
    }

    public void setSpeed(double d) {
        this.speed = d;
    }

    public double getDistance() {
        return this.distance;
    }

    public void setDistance(double d) {
        this.distance = d;
    }

    public float getRealPressure() {
        return this.realPressure;
    }

    public void setRealPressure(float f) {
        this.realPressure = f;
    }

    public float getRealTemperature() {
        return this.realTemperature;
    }

    public void setRealTemperature(float f) {
        this.realTemperature = f;
    }

    @Override
    public double getAltitude() {
        return this.altitude;
    }

    public void setAltitude(double d) {
        this.altitude = d;
    }

    public boolean isCalibrated() {
        return this.isCalibrated;
    }

    public void setCalibrated(boolean z) {
        this.isCalibrated = z;
    }

    public int getSource() {
        return this.source;
    }

    public void setSource(int i) {
        this.source = i;
    }

    public int getSumDuration() {
        return this.sumDuration;
    }

    public void setSumDuration(int i) {
        this.sumDuration = i;
    }

    public int getSumDistance() {
        return this.sumDistance;
    }

    public void setSumDistance(int i) {
        this.sumDistance = i;
    }

    public int getCSCFlags() {
        return this.CSCFlags;
    }

    public void setCSCFlags(int i) {
        this.CSCFlags = i;
    }

    public String getDeviceAddress() {
        return this.deviceAddress;
    }

    public void setDeviceAddress(String str) {
        Intrinsics.checkNotNullParameter(str, "<set-?>");
        this.deviceAddress = str;
    }

    public boolean sameWith(CadenceData cadenceData) {
        Intrinsics.checkNotNullParameter(cadenceData, "cadenceData");
        return this.sumCadence == cadenceData.sumCadence && this.cadenceTime == cadenceData.cadenceTime && this.sumWheel == cadenceData.sumWheel && this.wheelTime == cadenceData.wheelTime && this.pressure == cadenceData.pressure && this.temperature == cadenceData.temperature;
    }

    public static final class Companion {
        public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
            this();
        }

        public boolean isCadenceMode(int i) {
            return (i & 2) >= 1;
        }

        public boolean isSpeedMode(int i) {
            return (i & 1) >= 1;
        }

        private Companion() {
        }

        public boolean isSpeedCadenceMode(int i) {
            return isCadenceMode(i) & isSpeedMode(i);
        }
    }
}
